package com.kongjs.application.controller.rest;

import com.kongjs.application.model.dto.FileUploadDTO;
import com.kongjs.common.rest.annotation.Rest;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件上传接口
 */
@Rest
@RestController
@RequestMapping("/files")
public class FileController {

    /**
     * 上传签收照片
     *
     * @param file    照片文件
     * @param orderId 订单ID
     * @return 文件URL
     */
    @PostMapping("/sign-photos")
    public FileUploadDTO uploadSignPhoto(@RequestParam("file") MultipartFile file, @RequestParam("orderId") String orderId) {
        return null;
    }

    /**
     * 获取文件
     *
     * @param fileId 文件ID
     * @return 文件流
     */
    @GetMapping("/{fileId}")
    public ResponseEntity<Resource> getFile(@PathVariable String fileId) {
        return null;
    }
}
